<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
    <script src="../js/jquery.js"></script>
    <script src="../js/pintuer.js"></script>
</head>
<body>
<form action="expressupdate" method="post" name="form1">
    <div class="panel admin-panel">
        <div class="panel-head"><strong> 详情信息</strong></div>
        <div class="body-content">
            <div class="form-x">


                <div class="form-group">
                    <div class="label">
                        <label for="sitename">用户ID：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="memberid" disabled  value="{$list['memberid']}" size="50" />
                        <input type="text" class="input w50" name="memberid" style="display: none;"  value="{$list['memberid']}" size="50" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">总金额：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="pay"  value="{$list['pay']}" size="50" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">期数：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="bystages"  value="{$list['bystages']}" size="50" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">还款方式：</label>
                    </div>
                    <div class="field">
                        <select id="type" class="input w50" name="examine">
                            {if ($list.repayment == 1)}
                            <option value="{$list.repayment}" >微信</option>
                            {/if}
                            {if ($list.repayment == 2)}
                            <option value="{$list.repayment}" >支付宝</option>
                            {/if}
                            {if ($list.repayment == 3)}
                            <option value="{$list.repayment}" >银行卡转账</option>
                            {/if}
                            {if ($list.repayment == 4)}
                            <option value="{$list.repayment}" >其他</option>
                            {/if}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">用途：</label>
                    </div>
                    <div class="field">
                        <select id="type" class="input w50" name="examine">
                            {if ($list.purpose == 1)}
                            <option value="{$list.purpose}" selected>救急</option>
                            {/if}
                            {if ($list.purpose == 2)}
                            <option value="{$list.purpose}" selected>自用</option>
                            {/if}
                            {if ($list.purpose == 3)}
                            <option value="{$list.purpose}" selected>其他</option>
                            {/if}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">收款账户：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="payee"  value="{$list['payee']}" size="50" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">分期金额：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="bystagespay"  value="{$list['bystagespay']}" size="50" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label for="sitename">联系方式：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="payee"  value="{$list['phone']}" size="50" />
                    </div>
                </div>
                <!--<div class="form-group">
                    <div class="label">
                        <label for="sitename">还款方式：</label>
                    </div>
                    <div class="field">
                        <select id="type" class="input w50" name="state">
                            <option value="0" >未审核</option>
                            <option value="0" >已审核</option>
                        </select>
                    </div>
                </div>-->
            <center><button class="button bg-main icon-check-square-o" onclick="expressupdate({$list['id']})"> 确定</button>   </center>
        </div>
    </div>
    </div>
</form>
</body>
<script>
    function expressupdate(a) {
        var memberid = $(" input[ name='memberid' ] ").val();
        var bankname  = $(" input[ name='bankname' ] ").val();
        var bankaccount  = $(" input[ name='bankaccount' ] ").val();
        var bankaddress  = $(" input[ name='bankaddress' ] ").val();
        var examine  = $(" input[ name='examine' ] ").val();
        var emergencycontact1  = $(" input[ name='emergencycontact1' ] ").val();
        var emergencycontact2  = $(" input[ name='emergencycontact2' ] ").val();
        var emergencycontact3 = $("input[ name ='emergencycontact3' ]").val();
        if(memberid == ""){
            alert('用户用户账号不能为空');
            return false;
        }
        if(bankname == ""){
            alert('打款姓名不能为空');
            return false;
        }
        if(bankaccount == ""){
            alert('银行账户不能为空');
            return false;
        }
        if(bankaddress == ""){
            alert('开户地址不能为空');
            return false;
        }
        if(examine == ""){
            alert('是否审核不能为空');
            return false;
        }
        if(emergencycontact1 == ""){
            alert('紧急联系人1不能为空');
            return false;
        }
        if(emergencycontact2 == ""){
            alert('紧急联系人2不能为空');
            return false;
        }
        if(emergencycontact3 == ""){
            alert('紧急联系人3不能为空');
            return false;
        }
        document.form1.action="expressupdate?id="+a;
        //alert(123);
        document.form1.submit();
    }
</script>
</html>